package com.moyun.service.common;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * 通用Service实现类
 *
 * @param <V> 实体类Vo
 * @param <E> 实体类
 * @param <T> id主键类型
 */
@Slf4j
public class CommonServiceImpl<V, E, T> implements CommonService<V, E, T> {

//    private Class<V> entityVoClass;//实体类Vo
//
//    private Class<E> entityClass;//实体类
//
    @Autowired
    private BaseMapper<E> baseMapper;//注入实体类仓库

    @Override
    public List<E> list(V entityVo) {
        List<E> result = this.baseMapper.selectList(null);
        return result;
    }

}
